package com.cskaoyan.mapper;

import com.cskaoyan.bean.Coupon;
import com.cskaoyan.bean.CouponExample;
import com.cskaoyan.bean.params.BaseParam;
import com.cskaoyan.bean.vo.promotion_vo.CouponListInfoVO;
import com.cskaoyan.bean.wx.CouponMylistVO;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

public interface CouponMapper {
    long countByExample(CouponExample example);

    int deleteByExample(CouponExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Coupon record);

    int insertSelective(Coupon record);

    List<Coupon> selectByExample(CouponExample example);

    Coupon selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Coupon record, @Param("example") CouponExample example);

    int updateByExample(@Param("record") Coupon record, @Param("example") CouponExample example);

    int updateByPrimaryKeySelective(Coupon record);

    int updateByPrimaryKey(Coupon record);

    /**
     * /admin/coupon/list
     *
     * @param name
     * @param type
     * @param status
     * @return
     */
    List<CouponListInfoVO> select(@Param("name") String name, @Param("type") Short type, @Param("status") Short status, @Param("order") String order, @Param("sort") String sort);

    Integer selectMaxId();


    List<CouponMylistVO.ListEntity> selectMyCouponList(@Param("baseParam") BaseParam baseParam, @Param("userId") Integer userId, @Param("status") Integer status);

    List<Integer> selectGoodsIdsByUserId(@Param("userId") Integer userId, @Param("deleted") Integer deleted, @Param("checked") Integer checked);

    List<Double> selectByprice();

    List<Integer> selectIdByPrice();


}